# coding: utf-8

# list 类似数组
className = ['micheal', 'Bob', 'fish']
print className[0]
print len(className)
className.append('Adam')
print className
className.pop(0)  # pop()删除最后一个元素
print className
className = ["no1", 'no2', 'no3', ['no4', 'no5']]
print className[3][1]  # 多维list

# tuple 初始化后无法修改
classNameT = ('Bod', 'Stan')
print classNameT

# dict
dic = {'no1': 50, 'no2': 70, 'no8': 20}
print dic
print dic['no1']
dic['no3'] = 1000
dic['no1'] = 'wil'
print dic
print 'no19' in dic
print dic.get('no19') is None
print dic.pop('no8')
print dic

# set 无序无重复
s = set(('no1', 'no2', 'no3'))
print s
s.remove('no2')
print s
s.add('numbers')
print s
s.add('numbers2')
print s
s.add('numbers2')
print s
colls = ''
for item in s:
    colls = colls + ' ' + item
print colls